﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ThanhCongJSC.Helper.PaginatedList<ThanhCongJSC.Models.Content>>" %>
<%@ Import Namespace="ThanhCongJSC.Helper"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Thanh Cong JSC - Tin Tuc
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h1 class="componentheading" style="color:red;"><b>Tin Tức</b></h1>
    <% foreach (var item in Model)
    { %>
        <a class="image"><img src="<%= Url.Content(Constant.PathImageTinTuc + item.ContentImage ?? string.Empty) %>" alt="" width="100px" height="84px"/></a>
        <div style="list-style: none;line-height: 20px">
            <div class="title"><b><a href='<%= Url.Action("Index", new { queryString = item.ContentCode }) %>'><%= item.ContentTitle %></a></b></div>
                <p><%= item.BriefDescription?? string.Empty %></p>
            <div class="readmore"><a href='<%= Url.Action("Index", new { queryString = item.ContentCode }) %>'>Chi tiết &gt;&gt;</a></div>
        </div>
        <img src="<%= Application["Root"]%>/Content/images/hinhphanchia.jpg" alt="" width="580px"/>
        <br />
        <br />
    <%} %>
     
    <div style="text-align:right;color:#2222FF">
        <b>Trang : </b> 
            <% 
                for (int j = Model.PageIndex - 3; j < Model.PageIndex + 6; j++)
                    if (j > 0 && j <= Model.TotalPages)
                    {
                        if (j != Model.PageIndex + 1)
                            Response.Write(Html.ActionLink(j.ToString(), "Index", new
                            {
                                queryString = Constant.StringDanhSach + "-" + ViewData["QueryString"] + "-page" + (j).ToString()
                            }));
                        else
                            Response.Write(j.ToString());

                        if (j < Model.TotalPages)
                            Response.Write("&nbsp;|&nbsp;");
                    }
            %>
    </div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="CssJsRef" runat="server">
</asp:Content>
